package com.atwisdom.star.common.enums;

/**
 * routing状态枚举
 */
public enum RoutingStatusEnum {
        // 刚创建完实例
        WAITING("1", "等待中"),
        // 刚激活
        READY("2", "未开始"),
        RUNNING("3", "进行中"),
        FINISHED("4", "已完成");

        private String code;
        private String description;

        RoutingStatusEnum(String code, String description) {
            this.code = code;
            this.description = description;
        }

    public static RoutingStatusEnum getByCode(String code) {
        RoutingStatusEnum[] values = RoutingStatusEnum.values();
        for (RoutingStatusEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

}